﻿<!DOCTYPE html>

@using Shumei.EFCore.Model
@model CourseVideo
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    @Styles.Render("~/Content/Video/video-js.css")
    @Styles.Render("~/Content/css/easyScroll.css")
    @Styles.Render("~/Content/bootstrap-combined-min.css")

    @Scripts.Render("~/Content/js/easyScroll.js")
    

    <title></title>
</head>
<body>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span8">
                <video id="my-video" controls preload="auto" width="1040" height="440">
                    @{
                        int typeIndex = Model.VideoUrl.LastIndexOf('.')+1;
                        string videoType = Model.VideoUrl.Substring(typeIndex);
                        if (videoType == "mp4")
                        {
                            <source src="@Url.Content( Model.VideoUrl)" type="video/mp4">
                        }
                        else if (videoType == "webm")
                        {
                            <source src="@Url.Content(Model.VideoUrl)" type="video/webm">
                        }
                        else if (videoType == "ogv")
                        {
                             <source src="@Url.Content(Model.VideoUrl)" type="video/ogg">
                        }
                    }
                </video>
            </div>
            <div class="span4 ">
                <div class="container1">
                    <div class="div_scroll">
                        <div>
                            <table class="table table-hover table-condensed table-striped">
                                <tbody>
                                    @{
                                        Course course = (Course)ViewData["Course"];
                                        course.CourseVideos.Sort((a,b)=>{
                                            return a.No-b.No;
                                        });
                                        foreach(var m in course.CourseVideos)
                                        {
                                            <tr style="height: 50px; font-size:large">
                                            <td></td>
                                            <td>
                                                @{
                                                var value = new RouteValueDictionary();
                                                value.Add("CourseId",m.Course.Id);
                                                value.Add("VideoId",m.Id);
                                               <a href="@Url.Action("CourseVideo", "Course",value)">课程 @m.No @m.DesName</a>
                                                }                 
                                            </td>
                                            <td></td>
                                            <td></td>
                                            </tr> 
                                        }}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            
            
        </div>
    </div>
    

    <script type="text/javascript">
        $(document).ready(function () {
            $(".div_scroll").scroll_absolute({ arrows: true });
        });
    </script>

    

</body>

</html>
